package com.spring.cloud.exception;

/**
 * @author suguolin
 * @date 2019-02-19 9:52
 */
public class ValidException extends Exception{
    private String validMessage;

    public static ValidException of(String validMessage) {
        return new ValidException(validMessage);
    }

    private ValidException(String validMessage) {
        this.validMessage = validMessage;
    }

    public String getValidMessage() {
        return this.validMessage;
    }

    @Override
    public synchronized Throwable fillInStackTrace() {
        return this;
    }
}
